import request from '@/plugin/axios'
import util from '@/libs/util.js'

export default {

	list (data) {
		return request({
			url: 'mchSysAdmin/list',
			headers: {},
			method: 'post',
			data,
		});
	},

	info (data) {
		return request({
			url: 'mchSysAdmin/get',
			headers: {},
			method: 'post',
			data,
		});
	},

	add (data) {
		return request({
			url: 'mchSysAdmin/add',
			headers: {},
			method: 'post',
			data,
		});
	},

	set (data) {

		return request({
			url: 'mchSysAdmin/edit',
			headers: {},
			method: 'post',
			data,
		});
	},

	login (data) {

		return request({
			url: 'mchSysAdmin/login',
			headers: {},
			method: 'post',
			data,
		});
	},

	loginByToken (data = {}) {

		return request({
			url: 'mchInfo/get',
			headers: {},
			method: 'post',
			data,
		});
	},

	logout (data) {

		return request({
			url: 'mchSysAdmin/logout',
			headers: {},
			method: 'post',
			data,
		});
	},

	changePassword (data) {
		return request({
			url: 'mchSysAdmin/changePassword',
			headers: {},
			method: 'post',
			data,
		});
	},

	changeEmail (data) {
		return request({
			url: 'mchInfo/changeRegEmail',
			headers: {},
			method: 'post',
			data,
		});
	},


	resetAppSecret (data) {
		return request({
			url: 'mchSysAdmin/resetAppSecret',
			headers: {},
			method: 'post',
			data,
		});
	},

	resetGoogleAuthSecret (data) {
		return request({
			url: 'mchSysAdmin/resetGoogleAuthSecret',
			headers: {},
			method: 'post',
			data,
		});
	},
};